<!DOCTYPE html>
<html>
<head>
<head/>
<div th:include="base-libs :: base-libs" />
<div th:include="common/yljg-modal :: yljg-modal" />
<div th:include="common/common-export :: common-export" />
<title>理事会</title>
<style type="text/css">
</style>
</head>
<script th:inline="javascript">
	/**用户信息*/
	var userInfo = [[${userInfo}]];
</script>
<script type="text/javascript">
$(function() {
	$(this).registerManagerPage();
	enterToQuery(queryForm);
 	initView();
});

function queryForm() {
	$("#lshForm").datagrid("reload");
}

function initView()
{
	var opt ={
			idField : "YLJGID",
			uniqueId: "YLTID",
			striped : true,
			border:false,
			toolbar : "#dgFormToolbar",
			columns : [[
// 				{
// 					field: "checkStatus",
// 					checkbox: true
// 				},
				{
					field : "LSHMC",
					width: 150,
					align: "center",
					title : "理事会名称"
				},
				{
					field : "YLTMC",
					width: 150,
					align: "center",
					title : "所属医联体"
				},
				{
					field : "YLTLXMC",
					width: 120,
					align: "center",
					title : "医联体类型"
				},
				{
					field : "ZDYLJGMC",
					width: 150,
					align: "center",
					title : "主导机构"
				},
				{
					field : "CLSJ",
					width: 100,
					align: "center",
					title : "理事会成立时间"
				},
				{
					field : "LSZXM",
					width: 100,
					align: "center",
					title : "理事长",
				},
				{
					field : "BGSDZ",
					width: 250,
					align: "center",
					title : "办公室",
				},
				{
					field : "cz",
					width: 100,
					align: "center",
					title : "操作",
					formatter : operateFormatter
				}
			]]
			,pagination : true
			,pageNumber: 1
			,pageSize: 10
			,fit: true
			,fitColumns: true
			,singleSelect: true
			,rownumbers: true
			,method : "post"
			,url: contextRoot+"lshgl/queryPage.service"
			,onBeforeLoad:function(params){
				params["YLTMC"] = $("#YLTMC").val();
				params["LSHMC"] = $("#LSHMC").val();
				params["LSZXM"] = $("#LSZXM").val();
				params["YLJGID"] = userInfo["PTJGID"];
				return params; 
			}
		};
	$("#lshForm").datagrid(opt);
	
	/**查询理事会*/
	$("#btnQuery").on("click", function(){
		queryForm();
	});
	
	/**新建理事会*/
	$("#btnAdd").on("click", function(){
		$.QuickUrlUtils.redirectUrl("manager.html");
	});
}

/**操作格式化*/
function operateFormatter(value, row, index) {
	var tool = $("#tableToolBar").html();
	return tool.replace(/#index#/g,index);;
}

/**详细按钮*/
function detail(index){
	/**清除所有选择*/
	$("#lshForm").datagrid("clearSelections");
	/**选中当前行*/
	$("#lshForm").datagrid("selectRow", index);
	/**获取选中行数据*/
	var row = $("#lshForm").datagrid("getSelected", index);
	$.QuickUrlUtils.redirectUrl("detail.html?LSHGLID="+row["LSHGLID"]);
}

</script>

<body class="easyui-layout" >

<div region="north" style="border: none; overflow: hidden;">
		<h4 class="h4-title" style="text-align:center;margin:0;padding:0;font-size: 18px;">
			理事会管理
		</h4>
	</div>
	<div region="center" style="border: none;">
		<form id="exportForm" action="export.service" enctype="multipart/form-data">
			<input name="YLTIDS" id="YLTIDS" style="display: none;">
		</form>
		<div id="dgFormToolbar" style="background: white;">
			<table class="form-table" style="margin:0;padding:0;">
				<tr>
					<td class="td-text">理事会名称：</td>
					<td class="td-content">
						<input id="LSHMC" class="form-control dataField"/>
					</td>
					<td class="td-text">医联体名称：</td>
					<td class="td-content">
						<input id="YLTMC" class="form-control dataField"/>
					</td>
					</td>
					<td class="td-text">理事长：</td>
					<td class="td-content">
						<input id="LSZXM" class="form-control dataField"/>
					</td>
					<td class="td-text" style="text-align:center;width:160px;">
						<button id="btnQuery" class="btn btn-info" type="button">查询</button>
					</td>
				</tr>
			</table>
			<div style="margin:10px 10px auto 0px;">
				<button id="btnAdd" class="btn btn-info" type="button">新建理事会</button>
			</div>
		</div>
		<div class="easyui-layout" style="border: none;">
			<div region="center" style="border: none;">
				<table id="lshForm">
				</table>
			</div>
		</div>
	</div>
</body>
<script type="text/html" id="tableToolBar">
<a class="tableToolBarBtn" href="javascript:detail(#index#)" title="详细" >详细</a>
</script>
</html>



